//
//  MeViewController.m
//  07-HomeWork
//
//  Created by dllo on 16/7/22.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "MeViewController.h"
#import "LoginViewController.h"

@interface MeViewController ()

@end

@implementation MeViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    UIButton *loginButton = [[UIButton alloc] initWithFrame:CGRectMake(80, 100, 100, 100)];
    loginButton.backgroundColor = [UIColor yellowColor];
    [loginButton setTitle:@"点击登录" forState:UIControlStateNormal];
    [loginButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    [loginButton addTarget:self action:@selector(loginButtonClicked:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:loginButton];
}
- (void)loginButtonClicked:(UIButton *)button {
    LoginViewController *loginVC = [[LoginViewController alloc] init];
    UINavigationController *loginNavgation = [[UINavigationController alloc] initWithRootViewController:loginVC];
    [self presentViewController:loginNavgation animated:YES completion:nil];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
